package com.idcf.boathouse.order.entity;

import java.io.Serializable;
import lombok.Data;

/**
 * boat_house_product
 * @author 
 */
@Data
public class Product implements Serializable {
    private Integer id;

    private String foodName;

    private String foodPrice;

    private Integer foodNum;

    private String foodPicture;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Product other = (Product) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFoodName() == null ? other.getFoodName() == null : this.getFoodName().equals(other.getFoodName()))
            && (this.getFoodPrice() == null ? other.getFoodPrice() == null : this.getFoodPrice().equals(other.getFoodPrice()))
            && (this.getFoodNum() == null ? other.getFoodNum() == null : this.getFoodNum().equals(other.getFoodNum()))
            && (this.getFoodPicture() == null ? other.getFoodPicture() == null : this.getFoodPicture().equals(other.getFoodPicture()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFoodName() == null) ? 0 : getFoodName().hashCode());
        result = prime * result + ((getFoodPrice() == null) ? 0 : getFoodPrice().hashCode());
        result = prime * result + ((getFoodNum() == null) ? 0 : getFoodNum().hashCode());
        result = prime * result + ((getFoodPicture() == null) ? 0 : getFoodPicture().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", foodName=").append(foodName);
        sb.append(", foodPrice=").append(foodPrice);
        sb.append(", foodNum=").append(foodNum);
        sb.append(", foodPicture=").append(foodPicture);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}